<template>
  <div>
    <van-nav-bar
      title="注册账号"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <van-form @submit="onRegisterSubmit">
      <van-cell-group inset>
        <van-field
          v-model="username"
          name="用户名"
          label="用户名"
          placeholder="用户名"
          :rules="[{ required: true, message: '请填写用户名' }]"
        />
        <van-field
          v-model="password"
          type="password"
          name="密码"
          label="密码"
          placeholder="密码"
          :rules="[{ required: true, message: '请填写密码' }]"
        />
        <van-field
      v-model="headerimg"
      name="头像"
      label="头像名"
      placeholder="请输入头像"
       :rules="[{ required: true, message: '请填写头像名' }]"
    />
        
        <van-field
      v-model="nick1"
      name="昵称"
      label="昵称"
      placeholder="请输入昵称"
       :rules="[{ required: true, message: '请填写昵称' }]"
    />

      </van-cell-group>
      <div style="margin: 16px">
        <van-button round block type="primary" native-type="submit">
          注册
        </van-button>
      </div>
    </van-form>
  </div>
</template>

<script setup lang="ts">
import "vant/es/toast/style";
import { useMembersignin } from "@/hooks/home";
import {ref}  from "vue"
const { onRegisterSubmit, onClickLeft, username, password,nick1,headerimg} = useMembersignin();
//  const value = ref([
//       { url: 'https://fastly.jsdelivr.net/npm/@vant/assets/leaf.jpeg' },
//     ]);
</script>

<style lang="scss" scoped>
</style>
